<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- Import style -->
    <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css" />
    <!-- Import Vue 3 -->
    <script src="https://unpkg.com/vue@3"></script>
    <!-- Import component library -->
    <script src="https://unpkg.com/element-plus"></script>
</head>

<body>
    <div id="app">
        <el-row>
        <el-col :span="8"></el-col>
        <el-col :span="8">
        <h1>学习寄语</h1>
        <el-form :model="form">
            <el-form-item label="姓名">
                <el-input v-model="form.name" />
                </el-form-item>
                <el-form-item label="年龄">
                    <el-input v-model="form.age" />
                    </el-form-item>
                    <el-form-item label="身高">
                        <el-input v-model="form.height" />
                        </el-form-item>
                        <el-form-item label="寄语" v-if="form.height>=180">
                            <el-alert title="你真帅！" type="success" />
                        </el-form-item>
                        <el-form-item label="寄语"v-else-if="form.height>=170">
                            <el-alert title="你没对象" type="info" />
                        </el-form-item>
                        <el-form-item label="寄语"v-else-if="form.height>=160">
                            <el-alert title="该用功学习了。" type="warning" />
                        </el-form-item>
                        <el-form-item label="寄语"v-else>
                            <el-alert title="你脑子不好" type="error" />
                        </el-form-item>
                    </el-form>
                 </el-col>
                 <el-col :span="8"></el-col>
             </el-row>
    </div>
</body>
<script>
    const App = {
        data() {
            return {
                form: {
                    name: "小明",
                    age: 18,
                    height: 180,
                }

            }

        },
        methods: {}
    }
    Vue.createApp(App).use(ElementPlus).mount('#app')
</script>

</html>